package com.example.dubbo.provider.facade;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.example.dubbo.api.DemoFacade;
import com.example.dubbo.api.ReqDTO;
import com.example.dubbo.api.ResDTO;
import com.example.dubbo.provider.service.DemoService;
import com.outstanding.framework.core.PendingException;

public class DemoFacadeImpl implements DemoFacade{

	
	@Autowired
	private DemoService service;
	
	
	public ResDTO get(ReqDTO dto) throws PendingException {
		List<ResDTO> list = this.service.query();
		if(list!= null && list.size() >1)
			return list.get(0);
		else
			return null;
	}

}
